package ooday05;

public class EnumTest {
    public static void main(String[] args) {
        //枚举的用法
        Seasons[] seasons= Seasons.values();//获取所有的枚举对象
        for (int i=0;i<seasons.length;i++){
            System.out.println(seasons[i]);
        }
        //
        Seasons s=Seasons.SUMMER;//获取WINTER枚举对象
        switch (s){
            case SPRING:
                System.out.println("春天");
                break;
            case SUMMER:
                System.out.println("夏天");
                break;
            case AUTUMN:
                System.out.println("秋天");
                break;
            case WINTER:
                System.out.println("冬天");
        }




    }
}
